<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 
 <%@ page import = "com.shopping.*,java.util.*" %>
 
 <%@ include file= "sessioncheck.jsp" %>
 
 <%
 
 	List<User> users = User.findAllUsers();
 
  %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
</head>
<body>


		<table border="2" width="750">
			
				<tr>
					<td>
					 id
					</td>
					<td>
					username
					</td>
					<td>
					phone
					</td>
					<td>
					addr
					</td>
					<td>
					rdate
					</td>
					<td>
					操作
					</td>
				</tr>
		
					<%
						for(Iterator<User> it = users.iterator(); it.hasNext();){
							User u = it.next();
						
					 %>
					 
					 <tr>
					 	<td>
						 <%=u.getId() %>
						</td>
						<td>
						<%=u.getUsername() %>
						</td>
						<td>
						<%=u.getPhone() %>
						</td>
						<td>
						<%=u.getAddr() %>
						</td>
						<td>
						<%=u.getRdate() %>
						</td>
						 <td>
						<a href="userdelete.jsp?id=<%=u.getId() %>" >删除</a>
						</td>
					 </tr>
					 
					 <%
					 }
					  %>
		</table>
</body>
</html>